package cn.tianjindong.blog.mapper;

import cn.tianjindong.blog.pojo.BlogArticleComment;
import cn.tianjindong.blog.pojo.BlogArticleCommentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface BlogArticleCommentMapper {
    int countByExample(BlogArticleCommentExample example);

    int deleteByExample(BlogArticleCommentExample example);

    int deleteByPrimaryKey(Long id);

    int insert(BlogArticleComment record);

    int insertSelective(BlogArticleComment record);
    
    /**
     * 根据文章ID查询评论（关联查询评论的所属者User(只查询name,imgurl字段)）(前台系统使用)
     * @param articleId
     * @return
     */
    List<BlogArticleComment> getCommentListByArticleId(Long articleId);
    /**
     * 分页查询所有文章的评论（关联查询文章对象（只查询文章的ID，和标题））
     * @param startIndex
     * @param countItem
     * @return
     */
    List<BlogArticleComment> getCommentList(int startIndex, int countItem);

    List<BlogArticleComment> selectByExampleWithBLOBs(BlogArticleCommentExample example);

    List<BlogArticleComment> selectByExample(BlogArticleCommentExample example);

    BlogArticleComment selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BlogArticleComment record, @Param("example") BlogArticleCommentExample example);

    int updateByExampleWithBLOBs(@Param("record") BlogArticleComment record, @Param("example") BlogArticleCommentExample example);

    int updateByExample(@Param("record") BlogArticleComment record, @Param("example") BlogArticleCommentExample example);

    int updateByPrimaryKeySelective(BlogArticleComment record);

    int updateByPrimaryKeyWithBLOBs(BlogArticleComment record);

    int updateByPrimaryKey(BlogArticleComment record);

}